﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MyHealthByDesignWebsite.Models.HealthHistoryFieldsDesc>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    My Health Risks
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Diagnosed Disease</h2>

<% using (Html.BeginForm()) { %>
<table>
    <tr>
        <th>
            Diagnosed Disease
        </th>
        
    </tr>

<% foreach (var item in Model) { %>
     <%if (item.HHFD_desc != "Other")
       {%>
    <tr>
        <td>
           <%=Html.CheckBox(item.HHFD_fieldDescID)%>&nbsp;<%= item.HHFD_desc %>
             <%if (item.WP_wbPageID != null)
            {%>
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= Html.ActionLink(item.HHF_linkdesc.ToString(), "Details", "WebPage", new { id = item.WP_wbPageID.ToString() }, new { target = "_blank" })%> 
            <%} %>
        </td>
    </tr>
    <%} %>
<% } %>
    <% foreach (var item in Model) { %>
     <%if (item.HHFD_desc == "Other")
       {%>
    <tr>
        <td>
           <%=Html.CheckBox(item.HHFD_fieldDescID)%>&nbsp;<%= item.HHFD_desc %>
          &nbsp;– Please specify <%= Html.TextBox("otherText") %>
           <%if (item.WP_wbPageID != null)
            {%>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <%= Html.ActionLink(item.HHF_linkdesc.ToString(), "Details", "WebPage", new { id = item.WP_wbPageID.ToString() }, new { target = "_blank" })%> 
            <%} %>
        </td>
    </tr>
    <%} %>
<% } %>
</table>
        <p>
            <input type="submit" value="Continue" />
        </p>
<% } %>

</asp:Content>
